//
//  JSOrderHeaderView.m
//  jshop
//
//  Created by 张艳江 on 2019/5/21.
//  Copyright © 2019 张艳江. All rights reserved.
//

#import "SCOrderHeaderView.h"

@implementation SCOrderHeaderView

+ (instancetype)addOrderHeaderView{
    return [[NSBundle mainBundle]loadNibNamed:@"SCOrderHeaderView" owner:nil options:nil].lastObject;
}
- (void)setModel:(SCModel *)model{
    _model = model;
    self.shopNameLab.text = model.store_name;
    self.timeLab.text = [MyTool getTimeFromTimesTamp:model.pay_time];
    
    if ([model.type intValue] == 1) {//积分商城
        self.typeImage.image = [UIImage imageNamed:@"jfsc"];
    }else if ([model.type intValue] == 2){//商城
        self.typeImage.image = [UIImage imageNamed:@"dd_icon_sc"];
    }else if ([model.type intValue] == 3){//酒店住宿
        self.typeImage.image = [UIImage imageNamed:@"dd_icon_jdzs"];
    }
}

@end
